local t = Def.ActorFrame {};

t[#t+1] = Def.ActorFrame {
	Def.ActorFrame { -- bg color
		Def.Quad {
			InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;draworder,0);
			OnCommand=cmd(diffuse,color("#000011");diffusebottomedge,color("#000011"););
		};
	};
};
t[#t+1] = Def.ActorFrame { -- backgrounds
		LoadActor("_grid") .. {
			InitCommand=cmd(x,SCREEN_RIGHT+200;y,750;z,-250;pitch,-75;zoom,5;diffusealpha,0.5;spin;effectmagnitude,0,0,-60;draworder,1);
			OnCommand=function(self)
				if GAMESTATE:IsExtraStage2() then
					self:diffusealpha(0)
				elseif GAMESTATE:IsExtraStage() then
					self:diffuse(color("#FF0000")):diffusealpha(0.6)
				else
					self:diffuse(color("#0088FF")):diffusealpha(0.6)
				end
			end;
		};
};
local ex2 = GAMESTATE:IsExtraStage2();
if not ex2 then
	t[#t+1] = Def.ActorFrame { -- fader
			LoadActor("_fade") .. {
				InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-60;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;draworder,2;diffuse,color("#000011"));
				OnCommand=cmd(diffusealpha,1);
			};
	};
elseif ex2 then
	t[#t+1] = Def.ActorFrame { -- Another Stage background
		LoadActor("_riftback") .. {
			InitCommand=function(self) self:Center() end;
		};
		LoadActor("_riftportal") .. {
			InitCommand=function(self) self:Center():zoom(0.7):diffusealpha(0.6):queuecommand("Spin") end;
			SpinCommand=function(self) self:linear(10):addrotationz(360):queuecommand("Spin") end;
		};
	};
end
return t;